function clearCacheHarmony() {
    cordova.exec(
        function(successMessage) {
            document.getElementById("clearInfo").innerHTML = "清除缓存成功";
        },
        function(errorMessage) {
            document.getElementById("clearInfo").innerHTML = "清除缓存失败";
        },
        'CoreHarmony',
        'clearCache',
        [] // 空数组，因为不需要参数
    );
}

function clearHistoryHarmony() {
    cordova.exec(
        function(successMessage) {
            document.getElementById("historyInfo").innerHTML = "清除缓存成功";
        },
        function(errorMessage) {
            document.getElementById("historyInfo").innerHTML = "清除缓存失败";
        },
        'CoreHarmony',
        'clearHistory',
        [] // 空数组，因为不需要参数
    );
}

function backHistoryHarmony() {
    cordova.exec(
        function(successMessage) {
        },
        function(errorMessage) {
        },
        'CoreHarmony',
        'backHistory',
        [] // 空数组，因为不需要参数
    );
}

function overrideVolumeUp() {
    cordova.exec(
        function(successMessage) {
        },
        function(errorMessage) {
        },
        'CoreHarmony',
        'overrideButton',
        ["volumeup",true]
    );
}

function cancelOverrideVolumeUp() {
    cordova.exec(
        function(successMessage) {
        },
        function(errorMessage) {
        },
        'CoreHarmony',
        'overrideButton',
        ["volumeup",false]
    );
}

function overrideVolumeDown() {
    cordova.exec(
        function(successMessage) {
        },
        function(errorMessage) {
        },
        'CoreHarmony',
        'overrideButton',
        ["volumedown",true]
    );
}

function cancelOverrideVolumeDown() {
    cordova.exec(
        function(successMessage) {
        },
        function(errorMessage) {
        },
        'CoreHarmony',
        'overrideButton',
        ["volumedown",false]
    );
}



function loadUrl() {
    cordova.exec(
        function(successMessage) {
        },
        function(errorMessage) {
        },
        'CoreHarmony',
        'loadUrl',
        ["https://developer.huawei.com", {openexternal:true}]
    );
}